﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Website/Views/Shared/Product.Master"
    Inherits="System.Web.Mvc.ViewPage<ProductViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div class="classify_title">
        <form action="<%=Url.Action("List","Product") %>" method="get" class="search">
        <%= Html.TextBox("key",null,new {@class="width250"}) %>
        <input type="submit" value="<% =ViewsResources.Shared.Search%>" />
        </form>
        <%=Model.Classify.Title%>
    </div>
    <div class="productlist_box">
        <ul>
            <%
                foreach (var item in Model.ProductList) {
            %>
            <li>
                <div class="t">
                    <div>
                        <%=item.SubName %>
                    </div>
                </div>
                <div class="i">
                    <a href="<%=Url.Action("Preview", new { productId = item.ProductId }) %>">
                        <img src="<%=Url.Action("Thumb", "Home",
                         new { h = 210, w = 156, s = string.Format("{0}/{1}/{2}", Model.ImageRoot, item.ProductId, item.ImageName) })%>"
                            alt="<%= Html.Encode(item.ProductName)%>" />
                    </a>
                </div>
                <div class="ps">
                    <div>
                        <% if (Model.IsAuth) { %>
                        <del>
                            <%=item.Price%></del> <strong>
                                <%=(item.Price * item.MyDisCount).ToString("0.00")%></strong><% } %></div>
                </div>
                <div class="d">
                    <span onclick="location.href='<%=Url.Action("Preview", new { productId = item.ProductId }) %>';">
                        <img src="<%=Url.Content(ViewsResources.Shared.Details) %>" alt="" />
                    </span>
                    <%--<span onclick="return AddToCar('<%=item.ProductId %>');">
                        <img src="<%=Url.Content(ViewsResources.Shared.AddToCar) %>" alt="" />
                    </span>--%>
                </div>
            </li>
            <% } %>
        </ul>
    </div>
    <div class="divPager2">
        <%= Html.Pager(ViewData["Pager"]) %>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <%= HtmlMetaHelper.HtmlTitle(Model.Classify.Title,Model.Classify.KeyWords,Model.Classify.Description) %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cssLink" runat="server">
    <link rel="stylesheet" type="text/css" href="<%=Url.Content("~/css/Website/ProductList.css") %>" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="jsLink" runat="server">
    <script src="<%=Url.Content("~/Scripts/Website/AddToCar.js") %>" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cssContent" runat="server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="jsContent" runat="server">
</asp:Content>
